/**
 * Created by dell on 2017/4/8.
 */
const express=require('express');
const router=express.Router();
const MovieModel=require('../models/movie');


router.get('/',(req,res)=>{
  res.send('index.....');

})


//insert
router.post('/movie',(req,res)=>{
  MovieModel.create(req.body, function(err, docs){
    if(err) console.log(err);
    console.log('保存成功：' + docs);
  });
  res.json({result: 'success'});

})

module.exports=router;
